package edu.nuc.event.service;

import edu.nuc.event.dao.NoticesMapper;
import edu.nuc.event.pojo.Notices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticesService {

    @Autowired
    private NoticesMapper noticesMapper;

    public List<Notices> seletAllNotices() {
        List<Notices> noticesList = noticesMapper.seletAllNotices();
        return noticesList;
    }

    public int selectnoticesaccount() {
        int account = noticesMapper.selectnoticesaccount();
        return account;
    }

    public List<Notices> seletAllNoticesno() {
        List<Notices> noticesList = noticesMapper.seletAllNoticesno();
        return noticesList;
    }

    public int selectnoticesaccountno() {
        int account = noticesMapper.selectnoticesaccountno();
        return account;
    }


    public List<Notices> selectNoticesByCid(int cid) {
        List<Notices> noticesList = noticesMapper.selectNoticesByCid(cid);
        return noticesList;
    }

    public int NoticesByCidAccount(int cid) {
        int account = noticesMapper.NoticesByCidAccount(cid);
        return account;
    }

    public int addNotice(Notices notices) {
        int i = noticesMapper.addNotice(notices);
        return i;
    }

    public Notices selectNoticeID(int id) {
        Notices notices = noticesMapper.selectNoticeID(id);
        return notices;
    }

    public int updatenaticetype(int id, int notype) {
        int i = noticesMapper.updatenaticetype(id, notype);
        return i;
    }

}
